﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="db.aspx.cs" Inherits="CentralOffice.WebClient.db" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table>
            <tr>
                <td style="width: 762px">  请输入要执行的SQL语句：   <br />         
                    <asp:TextBox ID="TextBox1" runat="server" Height="207px" TextMode="MultiLine" Width="751px"></asp:TextBox></td>
                <td><asp:Button ID="Button4" runat="server" Text="执行SQL" OnClick="Button4_Click" OnClientClick="return confirm('确实要执行这些SQL语句吗?\n如果是删除或更新语句，则数据不能被还原了。');" /><br /><br /><br />
                    <input id="btnClear" name="btnClear" type="button" value="  清空  " onclick="document.getElementById('TextBox1').value='';" /><br /><br />
                    <asp:Button ID="btnBackup" runat="server" Text="备份数据库" OnClick="btnBackup_Click" /><br />
                    <asp:HyperLink ID="linkDownload" runat="server" Visible="false" >下载备份的数据库</asp:HyperLink>
                    </td>
            </tr>
            <tr>
                <td>                </td>
                <td>                </td>
            </tr>
        </table>
    </div>
    <div style="color:Red"><asp:Literal ID="lblError" runat="server" EnableViewState="false"></asp:Literal> </div>
    <asp:gridview ID="GridView2" runat="server" EnableViewState="false"></asp:gridview>
    <div style="height:10px"></div>
    <div style="margin-bottom:10px;">所有表：</div>
        <asp:gridview ID="GridView1" runat="server" AutoGenerateColumns="false" EnableViewState="false">
        <Columns>
        <asp:HyperLinkField DataNavigateUrlFormatString="ExecuteResult.aspx?tableschema={0}&tablename={1}" DataNavigateUrlFields="TABLE_SCHEMA,TABLE_NAME" Target="_blank" HeaderText="表名" DataTextField="TABLE_NAME" />
        <%--<asp:BoundField DataField="TABLE_COMMENT" HeaderText="表说明" />--%>
        <asp:HyperLinkField DataNavigateUrlFormatString="ExecuteResult.aspx?rows=true&tableschema={0}&tablename={1}" DataNavigateUrlFields="TABLE_SCHEMA,TABLE_NAME" Text="查看所有数据" Target="_blank" />
        </Columns>
        </asp:gridview>
    
    </form>
</body>
</html>
